In article <1996Apr9.164443.28709@relay.nswc.navy.mil>,
David R. Heffelfinger <dheffel@vitds2.nswc.navy.mil> wrote:
>Hi there,
> There is (hopefully) a simple answer to my question:
>
>I have some C code divided into different source files.
>When I try to compile using
> "cc file1.c file2.c file3.c"
>the constants #define'd in file1.c are not visible in file2.c, is there a way to make them visible to the other source files? In other words, is there som equivalent to "extern" for constants?
>
>Any help will be deeply appreciated.
Ha! There is one question we haven't seen around here!
You have to move these #defines to a separate file, usually named with a .h
suffix. Then you #include this file in all the others.